/**
 * 
 */
package com.feib.stms.stripes.exception;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import net.sourceforge.stripes.action.ErrorResolution;
import net.sourceforge.stripes.action.Resolution;
import net.sourceforge.stripes.exception.ActionBeanNotFoundException;
import net.sourceforge.stripes.exception.DefaultExceptionHandler;

/**
 * @author Jimmy Liu
 *
 */
public class StripesExceptionHandler extends DefaultExceptionHandler {
	
	/**
	 * 無法對應到哪個ActionBean，以404處理
	 * @param exception
	 * @param request
	 * @param response
	 * @return
	 */
	public Resolution handle(ActionBeanNotFoundException exception , HttpServletRequest request, HttpServletResponse response)
	{
		return new ErrorResolution(404, exception.getMessage());
	}

}
